<%@page import="cn.jhc.bean.NewsBean"%>
<%@page import="java.util.List"%>
<%@page import="cn.jhc.dao.ConnectionFactory"%>
<%@page import="cn.jhc.dao.NewsDAO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="./css/news.css"></link>
<style>
* {
	border: 0;
}
</style>
<title>校园新闻</title>
</head>
<body>
	<div id="wrapper">
		<jsp:include page="./header.jsp"></jsp:include>
		<%
			String id = request.getParameter("id");
			int Id = Integer.parseInt(id);
			NewsDAO dao = new NewsDAO();
			dao.setCon(ConnectionFactory.getConnection());
			NewsBean list = dao.getContext(Id);
			request.setAttribute("news", list);
		%>
		<div id="news">
			<div id="text2">
				<h3>${requestScope.news.title}</h3>
			</div>
			<div id="date2">
				<a>${requestScope.news.date}</a>
			</div>
			<div id="context">
				<a>${requestScope.news.context}</a>
			</div>
		</div>
	</div>
</body>
</html>
